package com.main.usermanagement.infrastructure.adapter;

import com.main.common.base.resp.RespBody;
import com.main.organizationandplatformmanagement.application.service.ExternalOrganizationModelAtomsService;
import com.main.organizationandplatformmanagement.interfaces.dto.OrganizationModelAtomsDTO;
import com.main.usermanagement.application.service.OrganizationModelAtomsService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class OrganizationModelAtomsServiceAdapter implements OrganizationModelAtomsService {

    private final ExternalOrganizationModelAtomsService externalOrganizationModelAtomsService;

    @Autowired
    public OrganizationModelAtomsServiceAdapter(ExternalOrganizationModelAtomsService externalOrganizationModelAtomsService) {
        this.externalOrganizationModelAtomsService = externalOrganizationModelAtomsService;
    }

    @Override
    public RespBody<String> getAtomTypeName(String atomId) {
        return externalOrganizationModelAtomsService.getAtomTypeName(atomId);
    }

    @Override
    public RespBody<OrganizationModelAtomsDTO> getOrganizationAtom(String atomId) {
        return externalOrganizationModelAtomsService.getOrganizationAtom(atomId);
    }
}